#include "../tools.h"
class Solution {
public:

    int helper(int num){
        if (num < 7 && num > -7) return num;

        return helper(num / 7) * 10 + num % 7;
    }

    string convertToBase7(int num) {
        int res_int = helper(num);
        cout << res_int << endl;
        char res[100];
        sprintf(res, "%d", res_int);
        return res;
    }
};


int main(int argc, char const *argv[])
{
    Solution s;

    string res = s.convertToBase7(99);
    cout << res;
    
    return 0;
}
